<div class="nav">
    <ul class="container">
        <li class="category-box">
            <div class="link">
                <a href="javascript:;"><?php echo $this->translate('全部商品分类'); ?><i class="triangle-b"></i></a>
            </div>
            <ul class="category">
                <?php
                if ($this->goods_class) {
                foreach ($this->goods_class as $class_key => $class_val) {
                if($class_val['class_state'] == 0) continue;
                ?>
                <li>
                    <?php if ($class_val['class_top_id'] == 0) { ?>
                    <a href="<?php echo $this->url('frontgoodslist/default', array('class_id'=>$class_val['class_id'])); ?>" class="title"><?php echo $this->escapeHtml($class_val['class_name']); ?><i class="fa">&#xf105;</i></a>
                    <?php if (isset($class_val['sub_class']) and !empty($class_val['sub_class'])) { ?>
                        <div class="category-sub">
                            <ul class="sub">
                                <li><p>
                                <?php foreach($class_val['sub_class'] as $sub_value) { ?>
                                    <a href="<?php echo $this->url('frontgoodslist/default', array('class_id'=>$sub_value['class_id'])); ?>"><?php echo $this->escapeHtml($sub_value['class_name']); ?></a>
                                <?php } ?>
                                    </p></li>
                            </ul>
                        </div>
                    <?php } ?>
<?php } ?>
</li>
<?php } } ?>

                <?php
                if ($this->frontside_array) {
                    foreach ($this->frontside_array as $frontside_key => $frontside_val) {
                        ?>
                        <li>
                            <?php if ($frontside_val['frontside_topid'] == 0) { ?>
                                <a href="<?php echo $frontside_val['frontside_url']; ?>" class="title" <?php if($frontside_val['frontside_new_window'] == 1) echo 'target="_blank"'; ?>><?php echo $this->escapeHtml($frontside_val['frontside_name']); ?><i class="fa">&#xf105;</i></a>
                                <?php if (isset($frontside_val['sub']) and !empty($frontside_val['sub'])) { ?>
                                    <div class="category-sub">
                                        <ul class="sub">
                                            <li><p>
                                                    <?php foreach($frontside_val['sub'] as $sub_value) { ?>
                                                        <a href="<?php echo $sub_value['frontside_url']; ?>" <?php if($sub_value['frontside_new_window'] == 1) echo 'target="_blank"'; ?>><?php echo $this->escapeHtml($sub_value['frontside_name']); ?></a>
                                                    <?php } ?>
                                                </p></li>
                                        </ul>
                                    </div>
                                <?php } ?>
                            <?php } ?>
                        </li>
                    <?php } } ?>
</ul>
</li>
<script>
    $(".category li").mouseenter(function() {
        $(this).addClass("hover");
    }).mouseleave(function() {
        $(this).removeClass("hover");
    });
    $(".category-box").mouseenter(function(){
        $(this).addClass("on");
    }).mouseleave(function(){
        $(this).removeClass("on");
    });
</script>
<li class="link"><a href="<?php echo $this->url('shopfront/default'); ?>"><?php echo $this->translate('首页'); ?></a></li>
<?php
$shop_middle_menu = $this->frontwebsite()->shopFrontMenu(2);
if(is_array($shop_middle_menu) and !empty($shop_middle_menu)) {
    foreach($shop_middle_menu as $middle_value) {
        ?>
        <li class="link">
            <a href="<?php echo $middle_value['navigation_url']; ?>" <?php if($middle_value['navigation_new_window'] == 1) echo 'target="_blank"'; ?>><span class="text"><?php echo $middle_value['navigation_title']; ?></span></a>
        </li>
    <?php } } ?>
</ul>
</div>
</div>

<div id="main">

    <div class="banner">
        <?php
        $ad_index_slide = $this->frontwebsite()->getShopAd('index', 'slide');
        if($ad_index_slide != '') {
            echo $ad_index_slide; //广告图片
        }
        ?>
</div>
<div class="top-show container">
    <div class="sub-1">
        <div class="tab ">
            <ul class="tab-head">
                <li><div><?php echo $this->translate('推荐商品'); ?></div><i></i></li>
                <li><div><?php echo $this->translate('特价商品'); ?></div><i></i></li>
            </ul>
            <div class="tab-body">
                <ul class="row clearfix">
                    <?php
                    $index_recom_goods = $this->frontwebsite()->getTagGoodsArray('index_recom');
                    if ($index_recom_goods) {
                    foreach ($index_recom_goods as $recom_goods_key => $recom_goods_value) {
                    if(!isset($recom_goods_value['one_class_id'])) continue;
                    ?>
                    <li class="col-1">
                        <dl class="product">
                            <dt class="img">
                                <a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$recom_goods_value['goods_id'], 'class_id'=>$recom_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($recom_goods_value['goods_name']); ?>"><img src="<?php echo $this->basePath($this->frontwebsite()->shopGoodsImage($recom_goods_value['goods_thumbnail_image'])); ?>" width=220></a>
                            </dt>
                            <dd class="title recom_spec"><a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$recom_goods_value['goods_id'], 'class_id'=>$recom_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($recom_goods_value['goods_name']); ?>"><?php echo $this->escapeHtml($recom_goods_value['goods_name']); ?></a></dd>
                            <dd class="price"><?php echo $this->frontwebsite()->shopPriceExtend($recom_goods_value['goods_shop_price']); ?></dd>
                        </dl>
                    </li>
                    <?php } } ?>
                </ul>
                <ul class="row clearfix">
                    <?php
                    $index_spec_goods = $this->frontwebsite()->getTagGoodsArray('index_spec');
                    if ($index_spec_goods) {
                        foreach ($index_spec_goods as $spec_goods_key => $spec_goods_value) {
                            if(!isset($spec_goods_value['one_class_id'])) continue;
                            ?>
                            <li class="col-1">
                                <dl class="product">
                                    <dt class="img">
                                        <a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$spec_goods_value['goods_id'], 'class_id'=>$spec_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($spec_goods_value['goods_name']); ?>"><img src="<?php echo $this->basePath($this->frontwebsite()->shopGoodsImage($spec_goods_value['goods_thumbnail_image'])); ?>" width=220></a>
                                    </dt>
                                    <dd class="title recom_spec"><a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$spec_goods_value['goods_id'], 'class_id'=>$spec_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($spec_goods_value['goods_name']); ?>"><?php echo $this->escapeHtml($spec_goods_value['goods_name']); ?></a></dd>
                                    <dd class="price"><?php echo $this->frontwebsite()->shopPriceExtend($spec_goods_value['goods_shop_price']); ?></dd>
                                </dl>
                            </li>
                        <?php } } ?>
                </ul>
            </div>
        </div>
    </div>
    <div class="sub-2">
        <div class="news-list">
            <div class="header"><?php echo $this->translate('新闻公告'); ?></div>
            <ul class="body">
                <?php
                $index_news_article = $this->frontwebsite()->getTagArticleArray('index_news', 'cms', 10);
                if ($index_news_article) {
                    foreach($index_news_article as $index_news_article_key => $index_news_article_val) {
                        ?>
                        <li>
                            <a href="<?php echo $this->url('frontarticle/default/cms_id',array('action'=>'content','cms_id'=>$index_news_article_val['article_id'])); ?>" target="_blank"><?php echo $this->escapeHtml($index_news_article_val['article_title']); ?></a>
                        </li>
                    <?php } } ?>
            </ul>
        </div>
    </div>
</div>

<div class="lists container">
<?php
$index_floor_1_goods = $this->frontwebsite()->getTagGoodsArray('index_floor_1');
if ($index_floor_1_goods) {
?>
    <div>
        <?php
        $index_floor_1_title = $this->frontwebsite()->getTagArticleArray('index_floor_1_title');
        ?>
        <div class="title-nav">
            <span class="floor-tag">1F / </span>
            <span class="title"><?php if(!empty($index_floor_1_title)) echo strip_tags($index_floor_1_title[0]['single_article_body']); ?></span>
        </div>
        <div class="item">
            <div class="sub-1">
                <?php
                $ad_index_floor_1_slide = $this->frontwebsite()->getShopAd('index', 'floor_1_slide');
                if($ad_index_floor_1_slide != '') {
                echo $ad_index_floor_1_slide;
                }
                ?>
                <?php
                $ad_index_floor_1_image = $this->frontwebsite()->getShopAd('index', 'floor_1_image');
                if($ad_index_floor_1_image != '') {
                    echo $ad_index_floor_1_image;
                }
                ?>
            </div>
        <div class="sub-2">
            <ul class="index-products">
                <?php
                foreach ($index_floor_1_goods as $floor_1_goods_key => $floor_1_goods_value) {
                if(!isset($floor_1_goods_value['one_class_id'])) continue;
                ?>
                <li>
                    <dl class="product">
                        <dt class="img">
                            <a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_1_goods_value['goods_id'], 'class_id'=>$floor_1_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_1_goods_value['goods_name']); ?>"><img src="<?php echo $this->basePath($this->frontwebsite()->shopGoodsImage($floor_1_goods_value['goods_thumbnail_image'])); ?>" width="220"></a>
                        </dt>
                        <dd class="title"><a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_1_goods_value['goods_id'], 'class_id'=>$floor_1_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_1_goods_value['goods_name']); ?>"><?php echo $this->escapeHtml($floor_1_goods_value['goods_name']); ?></a></dd>
                        <dd class="price"><?php echo $this->frontwebsite()->shopPriceExtend($floor_1_goods_value['goods_shop_price']); ?></dd>
                    </dl>
                </li>
                <?php } ?>
            </ul>
        </div>
    </div>
</div>
<?php  } ?>

    <?php
    $index_floor_2_goods = $this->frontwebsite()->getTagGoodsArray('index_floor_2');
    if ($index_floor_2_goods) {
        ?>
        <div>
            <?php
            $index_floor_2_title = $this->frontwebsite()->getTagArticleArray('index_floor_2_title');
            ?>
            <div class="title-nav">
                <span class="floor-tag">2F / </span>
                <span class="title"><?php if(!empty($index_floor_2_title)) echo strip_tags($index_floor_2_title[0]['single_article_body']); ?></span>
            </div>
            <div class="item">
                <div class="sub-1">
                    <?php
                    $ad_index_floor_2_slide = $this->frontwebsite()->getShopAd('index', 'floor_2_slide');
                    if($ad_index_floor_2_slide != '') {
                        echo $ad_index_floor_2_slide;
                    }
                    ?>
                    <?php
                    $ad_index_floor_2_image = $this->frontwebsite()->getShopAd('index', 'floor_2_image');
                    if($ad_index_floor_2_image != '') {
                        echo $ad_index_floor_2_image;
                    }
                    ?>
                </div>
                <div class="sub-2">
                    <ul class="index-products">
                        <?php
                        foreach ($index_floor_2_goods as $floor_2_goods_key => $floor_2_goods_value) {
                            if(!isset($floor_2_goods_value['one_class_id'])) continue;
                            ?>
                            <li>
                                <dl class="product">
                                    <dt class="img">
                                        <a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_2_goods_value['goods_id'], 'class_id'=>$floor_2_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_2_goods_value['goods_name']); ?>"><img src="<?php echo $this->basePath($this->frontwebsite()->shopGoodsImage($floor_2_goods_value['goods_thumbnail_image'])); ?>" width="220"></a>
                                    </dt>
                                    <dd class="title"><a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_2_goods_value['goods_id'], 'class_id'=>$floor_2_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_2_goods_value['goods_name']); ?>"><?php echo $this->escapeHtml($floor_2_goods_value['goods_name']); ?></a></dd>
                                    <dd class="price"><?php echo $this->frontwebsite()->shopPriceExtend($floor_2_goods_value['goods_shop_price']); ?></dd>
                                </dl>
                            </li>
                        <?php } ?>
                    </ul>
                </div>
            </div>
        </div>
    <?php  } ?>

    <?php
    $index_floor_3_goods = $this->frontwebsite()->getTagGoodsArray('index_floor_3');
    if ($index_floor_3_goods) {
        ?>
        <div>
            <?php
            $index_floor_3_title = $this->frontwebsite()->getTagArticleArray('index_floor_3_title');
            ?>
            <div class="title-nav">
                <span class="floor-tag">3F / </span>
                <span class="title"><?php if(!empty($index_floor_3_title)) echo strip_tags($index_floor_3_title[0]['single_article_body']); ?></span>
            </div>
            <div class="item">
                <div class="sub-1">
                    <?php
                    $ad_index_floor_3_slide = $this->frontwebsite()->getShopAd('index', 'floor_3_slide');
                    if($ad_index_floor_3_slide != '') {
                        echo $ad_index_floor_3_slide;
                    }
                    ?>
                    <?php
                    $ad_index_floor_3_image = $this->frontwebsite()->getShopAd('index', 'floor_3_image');
                    if($ad_index_floor_3_image != '') {
                        echo $ad_index_floor_3_image;
                    }
                    ?>
                </div>
                <div class="sub-2">
                    <ul class="index-products">
                        <?php
                        foreach ($index_floor_3_goods as $floor_3_goods_key => $floor_3_goods_value) {
                            if(!isset($floor_3_goods_value['one_class_id'])) continue;
                            ?>
                            <li>
                                <dl class="product">
                                    <dt class="img">
                                        <a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_3_goods_value['goods_id'], 'class_id'=>$floor_3_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_3_goods_value['goods_name']); ?>"><img src="<?php echo $this->basePath($this->frontwebsite()->shopGoodsImage($floor_3_goods_value['goods_thumbnail_image'])); ?>" width="220"></a>
                                    </dt>
                                    <dd class="title"><a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_3_goods_value['goods_id'], 'class_id'=>$floor_3_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_3_goods_value['goods_name']); ?>"><?php echo $this->escapeHtml($floor_3_goods_value['goods_name']); ?></a></dd>
                                    <dd class="price"><?php echo $this->frontwebsite()->shopPriceExtend($floor_3_goods_value['goods_shop_price']); ?></dd>
                                </dl>
                            </li>
                        <?php } ?>
                    </ul>
                </div>
            </div>
        </div>
    <?php  } ?>

    <?php
    $index_floor_4_goods = $this->frontwebsite()->getTagGoodsArray('index_floor_4');
    if ($index_floor_4_goods) {
        ?>
        <div>
            <?php
            $index_floor_4_title = $this->frontwebsite()->getTagArticleArray('index_floor_4_title');
            ?>
            <div class="title-nav">
                <span class="floor-tag">4F / </span>
                <span class="title"><?php if(!empty($index_floor_4_title)) echo strip_tags($index_floor_4_title[0]['single_article_body']); ?></span>
            </div>
            <div class="item">
                <div class="sub-1">
                    <?php
                    $ad_index_floor_4_slide = $this->frontwebsite()->getShopAd('index', 'floor_4_slide');
                    if($ad_index_floor_4_slide != '') {
                        echo $ad_index_floor_4_slide;
                    }
                    ?>
                    <?php
                    $ad_index_floor_4_image = $this->frontwebsite()->getShopAd('index', 'floor_4_image');
                    if($ad_index_floor_4_image != '') {
                        echo $ad_index_floor_4_image;
                    }
                    ?>
                </div>
                <div class="sub-2">
                    <ul class="index-products">
                        <?php
                        foreach ($index_floor_4_goods as $floor_4_goods_key => $floor_4_goods_value) {
                            if(!isset($floor_4_goods_value['one_class_id'])) continue;
                            ?>
                            <li>
                                <dl class="product">
                                    <dt class="img">
                                        <a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_4_goods_value['goods_id'], 'class_id'=>$floor_4_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_4_goods_value['goods_name']); ?>"><img src="<?php echo $this->basePath($this->frontwebsite()->shopGoodsImage($floor_4_goods_value['goods_thumbnail_image'])); ?>" width="220"></a>
                                    </dt>
                                    <dd class="title"><a href="<?php echo $this->url('frontgoods/default', array('goods_id'=>$floor_4_goods_value['goods_id'], 'class_id'=>$floor_4_goods_value['one_class_id'])); ?>" title="<?php echo $this->escapeHtml($floor_4_goods_value['goods_name']); ?>"><?php echo $this->escapeHtml($floor_4_goods_value['goods_name']); ?></a></dd>
                                    <dd class="price"><?php echo $this->frontwebsite()->shopPriceExtend($floor_4_goods_value['goods_shop_price']); ?></dd>
                                </dl>
                            </li>
                        <?php } ?>
                    </ul>
                </div>
            </div>
        </div>
    <?php  } ?>


</div>